package cn.net.cfss.fgbp.provider.console.biz;

import cn.net.cfss.fgbp.api.console.dto.SysUserBusiTypeDto;
import cn.net.cfss.fgbp.api.console.dto.SysUserRoleDto;
import cn.net.cfss.fgbp.api.console.vo.SysUserRoleVo;
import cn.net.cfss.fgbp.base.common.biz.BaseBiz;
import cn.net.cfss.fgbp.provider.console.dao.SysUserBusiTypeDtoMapper;
import cn.net.cfss.fgbp.provider.console.dao.SysUserRoleDtoMapper;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysUserBusiTypeDtoBiz extends BaseBiz<SysUserBusiTypeDtoMapper, SysUserBusiTypeDto> {

    /**
     * 批量插入用户业务类型
     *
     * @param sysUserBusiTypeDtoList
     * @return
     */
    public int insertBatch(List<SysUserBusiTypeDto> sysUserBusiTypeDtoList) {
        return mapper.insertBatch(sysUserBusiTypeDtoList);
    }

    /**
     * 根据用户ID删除
     *
     * @param userId
     * @return
     */
    public int deleteByUserId(Long userId) {
        return mapper.deleteByUserId(userId);
    }

    /**
     * 根据用户ID批量删除
     *
     * @param userIds
     * @return
     */
    public int deleteBatchByUserId(List<Long> userIds) {
        return mapper.deleteBatchByUserId(userIds);
    }

    /**
     * 根据用户ID查询业务类型信息
     *
     * @param userId
     * @return
     */
    public List<SysUserBusiTypeDto> getBusiTypeListByUserId(Long userId) {
        return mapper.getBusiTypeListByUserId(userId);
    }

    /**
     * 根据用户ID查询业务类型信息
     *
     * @param userId
     * @return
     */
    public List<Long> getBusiTypeIdListByUserId(Long userId) {
        return mapper.getBusiTypeIdListByUserId(userId);
    }

}
